package cn.ywang.simple;

import cn.ywang.product.*;

/**
 * 简单工厂类
 * 用户与产品之间的关系---小作坊式
 *
 * @Auther: BeatificWang
 * @Date: 2018/9/22 23:22
 */
public class SimpleFactory {

	public Phone getPhone(String type) {
		switch (type) {
			case "Apple":
				return new Apple();
			case "Huawei":
				return new Huawei();
			case "Meizu":
				return new Meizu();
			default:
				return new Copy();
		}
	}

}
